//
// Created by root on 6/22/17.
//

#ifndef FUNNY_WINDOW_H
#define FUNNY_WINDOW_H

#include <gtk/gtk.h>
#include "gdkkeysyms.h"  /* for GDK key values */

#include "editor.h"
#include "dialog.h"
// #include "gtk_config.h"
#include "filebuffer.h"
#include "menu.h"
#include "statusbar.h"
#include "settings.h"
#include "toolbar.h"

/* TODO:
 *  move all indent functions to gtk_indent.[ch]
 *  finish implementation of titlebar modified indication
 */

/* general functions */
GtkWidget *create_window (FunnyWindow *app);
// void help_about (FunnyWindow *app);

void set_tab_size (PangoFontDescription *font_desc, FunnyWindow *app, gint sz);

/* window callbacks */
gboolean on_window_delete_event (GtkWidget *widget, GdkEvent *event, FunnyWindow *app);
void on_window_destroy (GtkWidget *widget, FunnyWindow *app);

/* misc. callback functions */
gboolean on_keypress (GtkWidget *widget, GdkEventKey *event, FunnyWindow *app);
void on_insmode (GtkWidget *widget, FunnyWindow *app);
void on_mark_set (GtkTextBuffer *buffer, GtkTextIter *iter, GtkTextMark *mark, FunnyWindow *app);
void on_buffer_changed (GtkTextBuffer *buffer, FunnyWindow *app);

#endif //FUNNY_WINDOW_H
